package com.kkwrite.regimen.provider.controller.param;

import com.kkwrite.regimen.common.entity.dto.OutDTO;
import com.kkwrite.regimen.common.entity.dto.param.QueryParamOutDTO;
import com.kkwrite.regimen.provider.service.param.ParamService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * Created by lisha on 2018/7/22 11:42.
 *
 * @author lisha
 */
@RestController
@RequestMapping(value = "/param")
public class ParamController {

    @Resource(name = "paramService")
    private ParamService paramService;

    @GetMapping(value = "/queryParam")
    public OutDTO<QueryParamOutDTO> queryParam(Short type, String name) {
        return new OutDTO<>("true", null, null, paramService.queryParam(type, name));
    }

}
